package com.zeta.eduservice.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import com.zeta.commonutils.R;
import com.zeta.eduservice.entity.and.EduTeachergroupAndTeacher;
import com.zeta.eduservice.service.EduTeachergroupAndTeacherService;

/**
 * <p>
 * 教师组和教师中间表 前端控制器
 * </p>
 *
 * @author zeta
 * @since 2020-10-20
 */
@CrossOrigin
@RestController
@RequestMapping("/eduservice/edu-teachergroup-and-teacher")
public class EduTeachergroupAndTeacherController {

	
	@Autowired 
	EduTeachergroupAndTeacherService teacherGAndTeaService;
	
	@PostMapping("")
	public R save(@RequestBody EduTeachergroupAndTeacher groupAndTeacher) {
			teacherGAndTeaService.save(groupAndTeacher);
		return R.ok();
	}
	@DeleteMapping("{id}")
	public R delete(@PathVariable String id) {
		boolean removeById = teacherGAndTeaService.removeById(id);
		return R.ok();
	}
}

